import React from 'react'
import ReactDom from 'react-dom'

const isLoading = false

const loadData = () => {
  return isLoading ? <div>loading...</div> : <div>数据加载完成</div>
}

const title = (
  <div>
    {loadData()}
  </div>
)

ReactDom.render(title, document.querySelector('#root'))